#include <iostream>
#include <functional>
#include <string>

using namespace std;
using namespace std::placeholders;

void f(string, string, string, string, string);

int main()
{
    string a = "a", b = "b", c = "c";
    // g 是一个有两个参数的可调用对象
    auto g = bind(f, a, b, _2, c, _1);
    string X = "X", Y = "Y";
    g(X, Y);            // 等价于 f(a, b, Y, c, X)
    f(a, b, Y, c, X);
}

void f(string s1, string s2, string s3, string s4, string s5)
{
    cout << s1 << s2 << s3 << s4 << s5 << endl;
}